package com.diycode.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.diycode.utils.Entity;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author diycode
 * @since 2024-04-17
 */
public class Journeys extends Entity {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer journeyID;

    private Integer trainID;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date departureTime;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date arrivalTime;

    private Integer seatCapacity;

    @TableField(exist = false)
    private String trainNumber;

    public Integer getJourneyID() {
        return journeyID;
    }

    public void setJourneyID(Integer journeyID) {
        this.journeyID = journeyID;
    }

    public Integer getTrainID() {
        return trainID;
    }

    public void setTrainID(Integer trainID) {
        this.trainID = trainID;
    }

    public Date getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(Date departureTime) {
        this.departureTime = departureTime;
    }

    public Date getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(Date arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public Integer getSeatCapacity() {
        return seatCapacity;
    }

    public void setSeatCapacity(Integer seatCapacity) {
        this.seatCapacity = seatCapacity;
    }

    public String getTrainNumber() {
        return trainNumber;
    }

    public void setTrainNumber(String trainNumber) {
        this.trainNumber = trainNumber;
    }

    @Override
    public String toString() {
        return "Journeys{" +
                "journeyID = " + journeyID +
                ", trainID = " + trainID +
                ", departureTime = " + departureTime +
                ", arrivalTime = " + arrivalTime +
                ", seatCapacity = " + seatCapacity +
                "}";
    }
}
